import fetch from '@/utils/fetch'

export function apiAddWarranty(warrantyDto) {
  return fetch({
    url: '/api/v1/warranty',
    method: 'post',
    data: warrantyDto
  })
}

export function apiGetWarrantyList(listQuery) {
  return fetch({
    url: '/api/v1/warranty/list',
    method: 'get',
    params: listQuery
  })
}

export function apiUpdWarranty(warrantyDto) {
  return fetch({
    url: '/api/v1/warranty',
    method: 'put',
    data: warrantyDto
  })
}
export function apiGetWarrantyById(listQuery) {
  return fetch({
    url: '/api/v1/warranty',
    method: 'get',
    params: listQuery
  })
}

export function apiDelWarranty(listQuery) {
  return fetch({
    url: '/api/v1/warranty',
    method: 'delete',
    params: listQuery
  })
}
